/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020.
 * Description: support fiq_glue_setup.c for x86
 * Author: yingelin <yingelin@huawei.com>
 * Create: 2020-10-21
 */
#include <linux/nmi.h>
#include "fiq_glue_private.h"

int fiq_glue_register_handler(const struct fiq_glue_handler *handler)
{
	if (!handler || !handler->fiq)
		return -EINVAL;

	return register_nmi_handler(NMI_LOCAL, fiq_trigger, NMI_FLAG_FIRST, "RTOS_FIQ_GLUE_LASTWORDS");
}

void fiq_glue_unregister_handler(void)
{
	unregister_nmi_handler(NMI_LOCAL, "RTOS_FIQ_GLUE_LASTWORDS");
}
